************************
** Study 4 - Analyses **
************************

* setting directory
cd "C:\Users\bronc\Desktop\"

* load data
clear
use "C:\Users\bronc\Desktop\Study_4_dataset.dta"


** descriptive statistics **
sum age

tab gender

tab ideo_group

sum police_bias2

*******************
** Main analyses **
*******************

** Analyses among voting party bloc groups **

* one-sample t-test among right-wing voters
ttest police_bias2 == 5 if vote_right==1
ttest police_bias == 5 if vote_right==1 /*The original item with the technical error*/
ttest police_bias2 == 5 if vote_right==1 & vote!=7

* one-sample t-test among left-wing voters
ttest police_bias2 == 5 if vote_left==1
ttest police_bias == 5 if vote_left==1 /*The original item with the technical error*/

* one-sample t-test among centrists voters
ttest police_bias2 == 5 if vote_center==1
ttest police_bias == 5 if vote_center==1 /*The original item with the technical error*/

* one-sample t-test among "others" group
ttest police_bias2 == 5 if vote_other==1
ttest police_bias == 5 if vote_other==1 /*The original item with the technical error*/

* ANOVA - with the entire sample
oneway police_bias2 vote_group if vote_group!=3, t sch
oneway police_bias vote_group if vote_group!=3, t sch /*The original item with the technical error*/
anova police_bias2 vote_group if vote_group!=3
anova police_bias vote_group if vote_group!=3 /*The original item with the technical error*/


*************************
** Additional analyses **
*************************

* one-sample t-test among right-wing voters--without Yisrael Beitenu voters
ttest police_bias2 == 5 if vote_right==1 & vote!=7


** Analyses among ideological self-placement groups **
* one-sample t-test among Rightists
ttest police_bias2 == 5 if ideo_group==2

* one-sample t-test among Leftists
ttest police_bias2 == 5 if ideo_group==0

* one-sample t-test among Centrists
ttest police_bias2 == 5 if ideo_group==1

* ANOVA - with the entire sample
oneway police_bias2 ideo_group, t sch
anova police_bias2 ideo_group, 

